import { reactive,onMounted } from 'vue';
import axios from 'axios'

export default function (){
    let dogList = reactive(['https://images.dog.ceo/breeds/pembroke/n02113023_1258.jpg'])
    function addDog(){
        axios.get('https://dog.ceo/api/breeds/image/random').then(res=>{
            dogList.push(res.data.message)
        })
    }
    // onMounted(() => { addDog() })
    return {dogList, addDog}
}
